// Andrew Davies

#if !defined( PHYSICS_DYNAMICS_H )
#define PHYSICS_DYNAMICS_H

#include "Physics/Dynamics/physicsDynamicsFwd.h"
#include "d3d9.h"

namespace Physics
{
	
class DynamicsClass
{
private:
	D3DXVECTOR4 m_position;
	float m_orientation;

	D3DXVECTOR4 m_velocity;
	float m_angularVelocity;
	
	D3DXMATRIX m_transformation;

public:
	DynamicsClass( );

	DynamicsClass( 
		D3DXVECTOR4 const & position,
		float orientation,
		D3DXVECTOR4 const & velocity,
		float angularVelocity,
		D3DXMATRIX const & transformation );

	void set(
		D3DXVECTOR4 const & position,
		float orientation,
		D3DXVECTOR4 const & velocity,
		float angularVelocity,
		D3DXVECTOR4 const & centerOfMass );

	void step(
		const D3DXVECTOR4& force,
		float torque,
		float deltaTime,
		bool infiniteMass,
		float mass,
		float momentOfInertia,
		const D3DXVECTOR4& centerOfMass );

	D3DXVECTOR4 const & position( ) const
	{
		return m_position;
	}

	float orientation( ) const
	{
		return m_orientation;
	}

	D3DXVECTOR4 const & velocity( ) const
	{
		return m_velocity;
	}

	float angularVelocity( ) const
	{
		return m_angularVelocity;
	}

	D3DXMATRIX const & transformation( ) const
	{
		return m_transformation;
	}
};


}

#endif